.TH std::atomic_flag::test 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic_flag::test \- std::atomic_flag::test

.SH Synopsis
   bool test( std::memory_order order =
                  std::memory_order_seq_cst ) const volatile          \fB(1)\fP \fI(since C++20)\fP
   noexcept;
   bool test( std::memory_order order =                               \fB(2)\fP \fI(since C++20)\fP
                  std::memory_order_seq_cst ) const noexcept;

   Atomically reads the value of the *this and returns the value.

   If order is one of std::memory_order_release and std::memory_order_acq_rel, the
   behavior is undefined.

.SH Parameters

   order - the memory synchronization ordering

.SH Return value

   The value atomically read.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   atomic_flag_test
   atomic_flag_test_explicit atomically returns the value of the flag
   (C++20)                   \fI(function)\fP
   (C++20)

.SH Category:
     * Todo no example
